Caption = "Midi Player for <Your Program Name Here>"
ClientHeight = 5016
ClientLeft = 48
ClientTop = 336
ClientWidth = 3936
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5016
ScaleWidth = 3936
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command3
Caption = "&OK"
Height = 372
Left = 120
TabIndex = 5
Top = 4560
Width = 3732
End
Begin VB.FileListBox File1
Height = 3912
Left = 2040
TabIndex = 4
Top = 120
Width = 1812
End
Begin VB.DriveListBox Drive1
Height = 288
Left = 120
TabIndex = 3
Top = 120
Width = 1812
End
Begin VB.DirListBox Dir1
Height = 3528
Left = 120
TabIndex = 2
Top = 480
Width = 1812
End
Begin VB.CommandButton Command2
Caption = "&Stop"
Height = 375
Left = 2040
TabIndex = 1
Top = 4080
Width = 1812
End
Begin VB.CommandButton Command1
Caption = "&Play"
Default = -1 'True
Height = 375
Left = 120
TabIndex = 0
Top = 4080
Width = 1812
End
Attribute VB_Name = "frmMidi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub OpenMidi()
Dim sFile As String
Dim sShortFile As String * 67
Dim lResult As Long
Dim sError As String * 255
'Set the path and filename to open. I am using the 'mcitest.mid which I found in my VB5 directory in 'the sub folders samples\comptool\mci 'I just copied it to this projects folder.
sFile = Dir1.Path & "\" & File1.filename
'The mciSendString API call doesn't seem to like' 'long filenames that have spaces in them, so we 'will make another API call to get the short 'filename version.